import service from "@/utils/request";
import type { Response, PageResponse, CodeName } from "@/types/common";
export const useAccessAreaPageApi = (params: object) => {
  return service<any, Response<PageResponse<CodeName>>>({
    url: `/v1/access/area/page`,
    method: "GET",
    params,
  });
};

export const useAccessAreaQueryApi = (params: object) => {
  return service<any, Response<CodeName>>({
    url: `/v1/access/area/query`,
    method: "GET",
    params,
  });
};

export const useAccessAreaCreateApi = (data: object) => {
  return service({
    url: `/v1/access/area/create`,
    method: "POST",
    data,
  });
};

export const useAccessAreaUpdateApi = (data: object) => {
  return service({
    url: `/v1/access/area/update`,
    method: "POST",
    data,
  });
};

export const useAccessAreaDeleteApi = (data: object) => {
  return service({
    url: `/v1/access/area/delete`,
    method: "DELETE",
    data,
  });
};
